package com.ibm.cps.processors;

import java.util.Collection;

import com.ibm.cps.message.ParsedDataMessage;
import com.ibm.interfaces.ITimeSeriesSchema;
import com.ibm.util.exception.CPSException;

public abstract class AbstractProcessor {
	protected String tenantId;
	protected String processorId;
	protected String source;
	
	public AbstractProcessor(String tenantId, String processorId, String source) {
		this.tenantId = tenantId;
		this.processorId = processorId;
		this.source = source;
	}

	abstract public void open() throws CPSException;

	abstract public ITimeSeriesSchema getTimeSeriesSchema() throws CPSException;

	abstract public Collection<ParsedDataMessage> execute(ParsedDataMessage message) throws CPSException;

	abstract public void dispose();

	public String getProcessorId() {
		return processorId;
	}
	
	public String getTenantId(){
		return tenantId;
	}
	
	public String getSource() {
		return source;
	}

	public void startBatch() {

	}

	
	public void end() {

	}
}